<?php

use think\facade\Route;

$version = "v1";
//user路由
Route::group("api",function (){

    Route::group("/user",function(){
        Route::rule("/add","index/test","post");
        Route::rule("/list","index/select","get");

    });

    Route::group("/login",function (){
       Route::rule("/login","login/login","post");
       Route::rule("/register","login/register","post");
    });

})->prefix("$version.")
  ->allowCrossDomain([
        //跨域
        'Access-Control-Allow-Origin'        => '*',
        'Access-Control-Allow-Credentials'   => 'true'
]);

